package org.spring.service.v5;

import org.spring.beans.factory.annotation.Autowired;
import org.spring.dao.v5.AccountDao;
import org.spring.dao.v5.ItemDao;
import org.spring.stereotype.Component;
import org.spring.util.MessageTracker;

@Component(value = "petStore")
public class PetStoreService {
	@Autowired
	private AccountDao accountDao;
	@Autowired
	private ItemDao itemDao;

	public PetStoreService() {

	}

	public AccountDao getAccountDao() {
		return this.accountDao;
	}

	public ItemDao getItemDao() {
		return this.itemDao;
	}

	public void placeOrder() {
		System.out.println("place order");
		MessageTracker.addMsg("place order");
	}
	
	public void placeOrderWithException(){
		throw new NullPointerException();
	}
}
